package com.itsu.vtalk.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * @author suben
 * @createtime 2020/6/22 18:57
 **/
@Controller
public class ErrorController {


    @GetMapping("/error/500")
    public ModelAndView error500(HttpServletRequest request) {

        ModelAndView view = new ModelAndView("/error/500");
        view.addObject("returnCode", request.getParameter("returnCode"));
        view.addObject("returnMsg", request.getParameter("returnMsg"));
        return view;
    }

    @GetMapping("/error/404")
    public ModelAndView error404() {
        return new ModelAndView("/error/404");
    }


}
